/**
 * 路由器
 * Created by KY on 2017/7/19.
 */
define(['ldfw/core', 'ctrl/IndexCtrl'],
    function (LDFW, IndexCtrl) {
        var Router = LDFW.Router.extend({
            routes: {
                '': 'index#index',
                'index': 'index#index',
                'login': 'index#login',
                'register': 'index#register',
                'register_question':'index#registerQuestion',
                'authentication':'index#authentication',
                'risk_assessment':'index#riskAssessment',
                'risk_result':'index#riskResult',
                'main':'index#main',
                'main/:index': 'index#main',
                'profile':'index#profile',
                'profile/edit/:name':'index#profileEdit',
                'questionnaire':'index#questionnaire',
                'position/detail/:id':'index#positionDetail',
                'position/timeline/:id':'index#positionTimeLine',
                'product/detail/:id': 'index#productDetail',
                'product/news/:id':'index#productNewsDetail',
                'dividend/detail/:id':'index#dividendDetail',
                'notification':'index#notification',
                'notification/detail/:id':'index#notificationDetail',
                'changePwd':'index#changePwd',
                'product/purchase/:id':'index#purchase',
                'product/approp_confirm/:id':'index#appropConfirm',
                'product/risk_explain/:id':'index#riskExplain',
                'product/risk_warn/:id':'index#riskWarn',
                'product/warn_confirm/:id':'index#warnConfirm',
                'transform':'index#transform',
                'transform/detail/:id':'index#transformDetail',
                'transform/add':'index#transformAdd',
                'transaction':'index#transaction',
                'appointaction':'index#appointaction',
                'news/:id':'index#newsDetail',
                'product/appoint/:id':'index#appoint',
                'product/detail/:id':'index#detail'
            }
        })
        var router = new Router({
            controllers: {
                index: new IndexCtrl()
            }
        })

        return router
    })